home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / powerd / lib / startup_mui.ass < prev    next >
Encoding:
Text File  |  1980-01-06  |  2.1 KB  |  75 lines

  1. _START  move.l  a0,_arg
  2.         clr.b   (-1,a0,d0.w)
  3.         movea.l $4.w,a6
  4.         lea     (DOSName,pc),a1
  5.         moveq   #37,d0
  6.         jsr     (-552,a6)               ; OpenLibrary()
  7.         move.l  d0,_DOSBase
  8.         beq.s   .FINISH
  9.  
  10.         movea.l d0,a6
  11.         jsr     (-60,a6)                ; Output()
  12.         move.l  d0,_stdout
  13.         jsr     (-54,a6)                ; Input()
  14.         move.l  d0,_stdin
  15.  
  16.         movea.l $4.w,a6
  17.         lea     (IntName,pc),a1
  18.         moveq   #37,d0
  19.         jsr     (-552,a6)               ; OpenLibrary()
  20.         move.l  d0,_IntuitionBase
  21.         beq.s   .CLOSEDOS
  22.  
  23.         movea.l $4.w,a6
  24.         lea     (GfxName,pc),a1
  25.         moveq   #37,d0
  26.         jsr     (-552,a6)               ; OpenLibrary()
  27.         move.l  d0,_GfxBase
  28.         beq.s   .CLOSEINT
  29.  
  30.         movea.l $4.w,a6
  31.         lea     (MUIName,pc),a1
  32.         moveq   #19,d0
  33.         jsr     (-552,a6)
  34.         move.l  d0,_MUIMasterBase
  35.         beq.s   .CLOSEGFX
  36.  
  37.         xref    _main
  38.         jsr     _main           ; a6 is stored
  39.         move.l  d0,d2
  40.  
  41.         movea.l _MUIMasterBase,a1
  42.         jsr     (-414,a6)               ; CloseLibrary()
  43. .CLOSEGFX
  44.         movea.l _GfxBase,a1
  45.         jsr     (-414,a6)               ; CloseLibrary()
  46. .CLOSEINT
  47.         movea.l _IntuitionBase,a1
  48.         jsr     (-414,a6)               ; CloseLibrary()
  49. .CLOSEDOS
  50.         movea.l _DOSBase,a1
  51.         jsr     (-414,a6)               ; CloseLibrary()
  52. .FINISH move.l  d2,d0
  53.         rts
  54. ****************************************
  55.         xdef    _DOSBase
  56.         xdef    _IntuitionBase
  57.         xdef    _GfxBase
  58.         xdef    _MUIMasterBase
  59.         xdef    _arg
  60.         xdef    _stdout
  61.         xdef    _stdin
  62. ****************************************
  63. _DOSBase        dc.l    0
  64. _IntuitionBase  dc.l    0
  65. _GfxBase        dc.l    0
  66. _MUIMasterBase  dc.l    0
  67. _arg            dc.l    0
  68. _stdout         dc.l    0
  69. _stdin          dc.l    0
  70. ****************************************
  71. DOSName dc.b    'dos.library',0
  72. IntName dc.b    'intuition.library',0
  73. GfxName dc.b    'graphics.library',0
  74. MUIName dc.b    'muimaster.library',0
  75.